<?php
	@session_start();
	//-------------------------------------------------------
	include("includes/secure.php");	
	include("includes/config.php");	
	include("includes/class/payment.class.php");	
	//-------------------------------------------------------

	$payment = new Payment();
	$payments = $payment->listPaymentDebts($_SESSION['use_code']);

?>
<style type="text/css">
	
	*{
		font-family: Arial, Helvetica, sans-serif;
	}
	
	.transparent {
		/* Required for IE 5, 6, 7 */
		/* ...or something to trigger hasLayout, like zoom: 1; */
		width: 100%; 
	
		/* Theoretically for IE 8 & 9 (more valid) */
		/* ...but not required as filter works too */
		/* should come BEFORE filter */
		-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=10)";
	
		/* This works in IE 8 & 9 too */
		/* ... but also 5, 6, 7 */
		filter: alpha(opacity=10);
	
		/* Older than Firefox 0.9 */
		-moz-opacity:0.1;
	
		/* Safari 1.x (pre WebKit!) */
		-khtml-opacity: 0.1;
	
		/* Modern!
		/* Firefox 0.9+, Safari 2?, Chrome any?
		/* Opera 9+, IE 9+ */
		opacity: 0.1;
	}
	
	.white_line{
		color: #FFF;
		font-size:12px;
	}
	
	
	.tbl_bill{
		border:1px solid rgb(109,179,242);
		box-shadow: 5px 5px 25px #000;
		-moz-box-shadow: 5px 5px 25px #000;
		-webkit-box-shadow: 5px 5px 25px #000;
	}
	
	.title_bill{
		color:#333;
		font-size:15px;
		text-align:center;
		font-weight:bold;
	}
	
	.firstUnitedServicesLLC{
		font-size:19px;
		font-weight:bold;
		color:#000;
		text-decoration:underline;	
	}
	
	.lbl_gray{
		color:#666;
		font-size:12px;
	}
	
	.lbl_gray_right{	
		color:#666;
		font-size:12px;	
		text-align:right;	
	}
	
	.lbl_black{
		color:#000;
		font-size:12px;
	}
	
	.section_bill{
		border-bottom:1px solid rgb(109,179,242);
		color: rgb(109,179,242);
		font-size: 13px;
		font-weight:bold;
	}
	
	.section_bill_top{
		border-top:1px solid rgb(109,179,242);
		color: rgb(109,179,242);
		font-size: 13px;
		font-weight:bold;
	}
	
	.item_a{
		padding:5px;
		background:#fff;
		-moz-border-radius: 5px;
		-webkit-border-radius: 3px;
		text-align:left;
		color:#655A54;
		box-shadow: 1px 1px 2px #000;
	}

	.item_b{
		padding:5px;
		background:#CBE3F4;
		-moz-border-radius: 5px;
		-webkit-border-radius: 3px;
		text-align:left;
		color:#655A54;
		box-shadow: 1px 1px 2px #000;
	}
	
	.titulo{
		padding:5px;
		background:#BCBCBC;
		-moz-border-radius: 5px;
		-webkit-border-radius: 3px;
		text-align:center;
		color:#655A54;
		box-shadow: 1px 1px 2px #000;
	}
	
</style>
<!--________________ __________________________________________________________________________ ________________106-->
<!--_______________-->
<table cellpadding="0" cellspacing="0">
	<tr>
    	<td colspan="3">&nbsp;</td>
    </tr>
    <tr>
	    <td class="white_line">_____</td>
        <td>
        	<table class="tbl_bill">
            	<tr>
	                <td class="white_line">__________________________________________________________________________</td>
				</tr>
                <tr>
                    <td align="center">CLIENT'S LIST</td>
                </tr>
                <tr>
                <td>ADVISER : <?php echo strtoupper( $_SESSION['use_name']." ".$_SESSION['use_lastname']); ?></td>
                </tr>
                <tr>
                   <td>
                    	<table>
                        	<tr>
                                <td class="titulo">NOMBRE</td>
                                <td class="titulo">CASE No.</td>
                                <td class="titulo">INITIAL FEE</td>
                                <td class="titulo">BALANCE</td>
                                <td class="titulo">LAST PAYMENT</td>
                                <td class="titulo">DATE LAST PAYMENT</td>
                            </tr>
							<?php 
								$i=0;
								while($i<count($payments)){
									if($i%2==0)
										$class='item_a';
									else
										$class='item_b';
							?>
							<tr>
								<td class="<?php echo $class;?>"><?php echo $payments[$i]->cli_name.' '.$payments[$i]->cli_lastname;?></td>
								<td class="<?php echo $class;?>"><?php echo $payments[$i]->case_number;?></td>
                                <td class="<?php echo $class;?>">$<?php echo $payments[$i]->case_balance;?></td>
								<td class="<?php echo $class;?>">$ <?php echo $payments[$i]->pay_balance;?></td>
								<td class="<?php echo $class;?>">$ <?php echo $payments[$i]->pay_value;?></td>
								<td class="<?php echo $class;?>"><?php echo cambiarFormatoFecha(substr($payments[$i]->pay_date_create, 0,10),3);?></td>
								
							</tr>
							<?php $i++; }?>
                       </table>                                    
								</td>
                                <td>&nbsp;</td>
                            </tr>
                            
            </table>
        </td>
        <td class="white_line"></td>
    </tr>        
</table>
